//
//  AIMineThreeButtonCell.m
//  ZJCLoveBee
//
//  Created by 朱建超 on 16/12/23.
//  Copyright © 2016年 itHeiMa. All rights reserved.
//

#import "AIMineThreeButtonCell.h"
#import "AIMineThreeButtonView.h"
#import "Masonry.h"

@interface AIMineThreeButtonCell ()

@property(nonatomic,weak)AIMineThreeButtonView *threeButtonView;

@end

@implementation AIMineThreeButtonCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
        
    }
    return self;
}

-(void)setupUI{

    AIMineThreeButtonView *threeButtonView = [[AIMineThreeButtonView alloc] init];
    
    [self.contentView addSubview:threeButtonView];
    
    self.threeButtonView = threeButtonView;
    
    [self.contentView addSubview:self.threeButtonView];
    
    [self.threeButtonView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.right.top.bottom.mas_equalTo(self.contentView);
        make.height.mas_equalTo(80);
    }];
    
    UIView *firstLine = [[UIView alloc] init];
    
    [self.threeButtonView addSubview:firstLine];
    
    firstLine.backgroundColor = [UIColor lightGrayColor];
    
    [firstLine mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.mas_equalTo(self.threeButtonView.mas_centerY);
        make.height.mas_equalTo(50);
        make.width.mas_equalTo(3);
        make.left.mas_equalTo(self.threeButtonView.mas_left).offset([UIScreen mainScreen].bounds.size.width / 3);
        
    }];
    
    UIView *secondLine = [[UIView alloc] init];
    
    [self.threeButtonView addSubview:secondLine];
    
    secondLine.backgroundColor = [UIColor lightGrayColor];
    
    [secondLine mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.mas_equalTo(self.threeButtonView.mas_centerY);
        make.height.mas_equalTo(50);
        make.width.mas_equalTo(3);
        make.right.mas_equalTo(self.threeButtonView.mas_right).offset(-[UIScreen mainScreen].bounds.size.width / 3);
        
    }];

}

@end
